import request from '@/utils/request'

export function getProcessDefinitionPage(query) {
  return request({
    url: '/process-definition/page',
    method: 'get',
    params: query
  })
}

export function getProDefPage(query) {
  return request({
    url: '/process-definition/start-page',
    method: 'get',
    params: query
  })
}

export function getProcessDefinitionList(query) {
  return request({
    url: '/process-definition/list',
    method: 'get',
    params: query
  })
}

export function getBpmnXMLByDeploymentId(id) {
  return request({
    url: '/process-definition/getBpmnXMLByDeploymentId?id=' + id,
    method: 'get'
  })
}

export function getBpmnXmlByDefinitionId(id) {
  return request({
    url: '/process-definition/getBpmnXmlByDefinitionId?id=' + id,
    method: 'get'
  })
}

export function getActiveProcessDefinitionByKey(key) {
  return request({
    url: '/process-definition/getActiveProcessDefinitionByKey?key=' + key,
    method: 'get'
  })
}

